package com.onlinelibrary.activities.main.ui.tour;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.library.baseAdapters.BR;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import com.onlinelibrary.R;
import com.onlinelibrary.databinding.FragmentTourBinding;

public class TourFragment extends Fragment {
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_tour, container, false);
        FragmentTourBinding binding = DataBindingUtil.bind(root);
        TourVM vm = new ViewModelProvider(this).get(TourVM.class);
        assert binding != null;
        binding.setVariable(BR.vm,vm);
        binding.setLifecycleOwner(this);
        vm.setBinding(binding,this,requireActivity());
        return root;
    }
}